import { Button } from 'antd';
import React, { useState } from 'react';

type product = {
  id?: string;
  name?: string;
};
const NewPage: React.FC = () => {
  const [count, setCount] = useState<product>({});
  const changeCount = () => {
    const newProduct: product = {
      id: '1',
      name: 'jjj',
    };
    setCount(newProduct);
  };
  return (
    <div>
      <div>
        {count.id}
        {count.name}
      </div>
      <Button onClick={changeCount}>xx</Button>
    </div>
  );
};
export default NewPage;
